import Vue from 'vue'
import Router from 'vue-router'
import cjy from "./cjy";
import zx from "./zx";
import wxh from "./wxh";
import lwk from "./lwk";
import gw from "./gw";
import xxy from "./xxy";
import qxz from "./qxz";
import jyy from "./jyy";
import zwy from "./zwy";
import hzh from "./hzh";
import mergeRouter from "../utils/settings/mergeRouter";
const Home = resolve => require(['../Home'], resolve);
const RealIndex = resolve => require(['../real-containers/Index'], resolve);
const Test2 = resolve => require(['../real-containers/Test2'], resolve);
const StyleIndex = resolve => require(['../style-containers/Index'], resolve);
const TestPage = resolve => require(["../edit-containers/TestPage"], resolve);
const Main = resolve => require(['../Main.vue'], resolve);
const Closed = resolve => require(['../real-containers/Closed'], resolve);
Vue.use(Router)
// export default new Router({
let routers = {

}
console.log("初始化路由");
routers["ProductionRouter"] = new Router({
	routes: [
		{
			path: '/',
			redirect: {name: "main"}
		},
		//主区域界面
		{
			path: '/main',
			name: 'main',
			redirect: {name: "home"},
			component: Main,
			//主区域界面下的每个页面
			children: [
				...cjy,
				...zx,
				...wxh,
				...lwk,
				...gw,
				...xxy,
				...qxz,
				...jyy,
				...zwy,
				...hzh,
				...mergeRouter()
			]
		}
	]
});
routers.closed = new Router({
	routes: [
		{
			path: '/',
			component: Closed
		}
	]
});
console.log("打印路由结构", routers);
export default {
	...routers
}
